home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000530_tex@itk.unit.no_Wed May 4 16:28:19 1994.msg < prev    next >
Internet Message Format  |  1994-10-11  |  6KB

  1. Received: from adam.itk.unit.no by cs.umb.edu with SMTP id AA23146
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Wed, 4 May 1994 08:28:43 -0400
  3. Received: from tobias (tobias.itk.unit.no) by adam.itk.unit.no with SMTP id AA12662
  4.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Wed, 4 May 1994 14:28:19 +0200
  5. Date: Wed, 4 May 1994 14:28:19 +0200
  6. From: tex@itk.unit.no
  7. Message-Id: <9405041228.AA03348@tobias>
  8. To: Rik Faith <faith@cs.unc.edu>
  9. Cc: tex-k@cs.umb.edu
  10. Subject: Re: MakeTeXPK and the Sauter fonts
  11. In-Reply-To: <9404291750.AA21537@proteus.cs.unc.edu>
  12. References: <9404291750.AA21537@proteus.cs.unc.edu>
  13.  
  14. >>>>> "RF" == Rik Faith <faith@cs.unc.edu> writes:
  15.  
  16.     RF> Also, none of the tfm files are available for the Sauter
  17.     RF> fonts, making them essentially useless.  What have I missed
  18.     RF> here?  Is there a set of Sauter tfm files that I can get?  Is
  19.     RF> there some easy way to get these fonts built on-the-fly for
  20.     RF> TeX (i.e., I need a MakeTeXTFM, or something like that).
  21.  
  22. I use this MakeTeXTFM, (this is my updated version for the new
  23. web2c-distribution; Karl, this version works, the old ones you got
  24. from me doesn't work with web2c-6.*, only with web2c-5***)
  25.  
  26. To get it work with the sauter stuff you have to either include the
  27. sauter part from MakeTeXPK in this script or use my MakeTeXMF script
  28. which I also append to this posting. You have to make sure that TeX
  29. and MF calls the script by defining MAKE_TEX_MF_BY_DEFAULT and
  30. MAKETEX_TFM_BY_DEFAULT in lib/c-auto.h.in in the web2c-distribution.
  31.  
  32. Share and enjoy!
  33.  
  34. #!/bin/sh
  35. #
  36. #   This script file makes a new TeX TFM font, because one wasn't
  37. #   found.  Usage:
  38. #
  39. #   MakeTFM name [mode]
  40. #
  41. #   `name' is the name of the font, such as `cmr10'.
  42. #   `mode', if supplied, is the mode to use.
  43. #
  44. #   Note that this file must execute Metafont, and place the result 
  45. #   in the correct location.
  46. #
  47. #   Of course, it needs to be set up for your site.
  48. #
  49. # TEMPDIR needs to be unique for each process because of the possibility
  50. # of simultaneous processes running this script.
  51. ##DESTDIR=/LocalLibrary/Fonts/TeXFonts/pk
  52. ##DESTDIR=/usr/local/lib/tex/localfonts
  53. TEXDIR=/u/tex/lib/texmf
  54. LOCALDIR=$TEXDIR/fonts
  55. DESTDIR=$LOCALDIR/tmp/tfm
  56. OLDDESTDIR=/u/tex/lib/tex/fonts/tmp/tfm
  57. TEMPDIR=/tmp/mttfm.$$
  58. NAME=`echo $1 | sed 's/\.tfm$//'`
  59. MODE=$2
  60.  
  61. umask 0
  62.  
  63. if test "$MODE" = ""
  64. then MODE=nullmode
  65. fi
  66.  
  67. TFMNAME=$NAME.$DPI'tfm'
  68.  
  69. # Clean up on normal or abnormal exit
  70. trap "cd /; rm -rf $TEMPDIR $DESTDIR/tfmtmp.$$" 0 1 2 15
  71.  
  72. if test ! -d $DESTDIR
  73. then
  74.    mkdir $DESTDIR
  75. fi
  76.  
  77. mkdir $TEMPDIR
  78. cd $TEMPDIR
  79.  
  80. if test -r $DESTDIR/$TFMNAME
  81. then
  82.    echo "$DESTDIR/$TFMNAME already exists!" >&2
  83.    exit 0
  84. fi
  85.  
  86. echo "Try making missing font metric file $TFMNAME" >&2
  87. echo mf "\mode:=$MODE; mag:=1; scrollmode; input $NAME" >&2
  88. mf "\mode:=$MODE; mag:=1; scrollmode; input $NAME" </dev/null >&2
  89. if test ! -r $TFMNAME
  90. then
  91.    echo "Metafont failed for some reason on $TFMNAME" >&2
  92.    exit 1
  93. fi
  94.  
  95. # Install the TFM file carefully, since others may be doing the same
  96. # as us simultaneously.
  97.  
  98. chmod 644 $TFMNAME
  99. mv $TFMNAME $DESTDIR/tfmtmp.$$
  100. cd $DESTDIR
  101. mv tfmtmp.$$ $TFMNAME
  102. cp $TFMNAME $OLDDESTDIR/$TFMNAME
  103.  
  104. echo $DESTDIR/$TFMNAME
  105.  
  106.  
  107.  
  108. #!/bin/sh
  109. #
  110. # This script make a new METAFONT cm*.mf or dc*.mf file
  111. # because one wasn't found.  Usage
  112. #
  113. # MakeTeXMF name
  114. #
  115. # `name' is the name of the font file, such as `cmr10'
  116. #
  117. # This file need the sauter font system and the dc fonts
  118. #
  119. # Of course this need to be customized to your site
  120. MFDIR=/u/tex/lib/mf
  121. DESTDIR=$MFDIR/macros/tmp
  122. SAUTERDIR=/u/tex/src/fonts/sauter
  123. DCDIR=/u/tex/src/fonts/dc
  124.  
  125. NAME=`echo $1 | sed 's/\.mf$//'`
  126.  
  127. umask 0
  128.  
  129. MFNAME=$NAME.mf
  130.  
  131. # Which type of font is this?
  132. case $NAME in
  133.   cm*) font=cm;;
  134.   dc*) font=dc;;
  135.   *) font=other;;
  136. esac
  137.  
  138. if test -r $DESTDIR/$MFNAME
  139. then
  140.    echo "$DESTDIR/$MFNAME already exists!" >&2
  141.    exit 0
  142. fi
  143.  
  144. # check also in the standard place
  145.  
  146. if test -r /usr/local/lib/mf/inputs/$MFNAME
  147. then
  148.    echo "/usr/local/lib/mf/inputs/$MFNAME already exists!" >&2
  149.    exit 0
  150. fi
  151.  
  152. if test $font = cm; then
  153.   # The font is CM.  Try Sauter's scripts.
  154.   cd $SAUTERDIR
  155.   rootfont=`echo $NAME | sed 's/[0-9]*$//'`
  156.   pointsize=`echo $NAME | sed 's/cm[a-z]*//'`
  157.   make-mf $rootfont $pointsize
  158.   echo "Trying interpolated/extrapolated (Sauter) CM source." >&2
  159.   # Install the MF file carefully, since others may be doing the same
  160.   # as us simultaneously.
  161.  
  162.   chmod 644 mf/$MFNAME
  163.   mv mf/$MFNAME $DESTDIR/mftmp.$$
  164.   cd $DESTDIR
  165.   mv mftmp.$$ $MFNAME
  166. elif test $font = dc; then
  167.   # The font is DC. 
  168.   cd $DCDIR
  169.   rootfont=`echo $NAME | sed 's/[0-9]*$//'`
  170.   pointsize=`echo $NAME | sed 's/dc[a-z]*//'`
  171.   cat dcstdedt.pre > dctmp.tex
  172.   echo $pointsize " ) " >> dctmp.tex
  173.   echo "     \makefont " $rootfont " ( " $pointsize " ) " >> dctmp.tex
  174.   cat dcstdedt.end >> dctmp.tex
  175.   tex dctmp > /dev/null
  176.   rm -f dctmp.* mfbatch.bat
  177.   echo "Trying interpolated/extrapolated DC source." >&2
  178.   # Install the MF file carefully, since others may be doing the same
  179.   # as us simultaneously.
  180.  
  181.   chmod 644 $MFNAME
  182.   mv $MFNAME $DESTDIR/mftmp.$$
  183.   cd $DESTDIR
  184.   mv mftmp.$$ $MFNAME 
  185. else
  186.   echo "MakeTeXMF is not implemented for this font" >&2
  187. fi
  188.  
  189. echo $DESTDIR/$MFNAME
  190.  
  191.     RF> Thanks for the help, Rik.
  192.  
  193. Regards, Per Norman Oma                 (The TeX/LaTeX manager at:)
  194.  
  195. Department of Engineering Cybernetics    : Phone +47 73594392 (direct) 
  196. The Norwegian Institute of Technology    :     +47 73594376 (switchboard)
  197. N-7034 Trondheim                        : Fax   +47 73594399
  198. NORWAY                    : Email TeX@itk.unit.no
  199.